IOStream: Input with while
Pascal
C/C++
NO PASCAL
cin >> s;
EQUIVALENT
while(cin.get() != ‘\n’);
cin >> c, I, r;
while(cin.get() != ‘\n’);
w
var
w
c: char;
w
i: integer;
w
r: real;
w
s: packed array[1..10]
of char;
w
#include <stdio.h>
w
char c;
w
int i;
w
float r;
w
char s[10];
C++ only: